package com.easycms.framework.exception;

import java.io.Serializable;

/**
 * @author yushuo
 * @className
 * @descripton TODO
 * @date 2021/2/2 16:50
 **/
public class EasyException extends RuntimeException implements Serializable {

    private static final long serialVersionUID = 1L;
    private String message;
    private int code = 500;

    public boolean isStatus() {
        return status;
    }

    public void setStatus(boolean status) {
        this.status = status;
    }

    private boolean status;

    public EasyException(String msg) {
        super(msg);
        this.message = msg;
    }

    public EasyException(String msg, Throwable e) {
        super(msg, e);
        this.message = msg;
    }

    public EasyException(int code,String msg) {
        super(msg);
        this.message = msg;
        this.code = code;
    }

    public EasyException(String msg, int code, Throwable e) {
        super(msg, e);
        this.message = msg;
        this.code = code;
    }

    public String getMsg() {
        return message;
    }

    public void setMsg(String msg) {
        this.message = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
